package model

import "github.com/gogf/gf/v2/os/gtime"

const (
	HeaderTotal = "X-Total"
	TimeFormat  = "Y/m/d H:i:s"
)

// request

type Operation struct {
	CreatedIp string `p:"created_ip" v:"required"`
	CreatedBy uint   `p:"created_by" v:"required|integer"`
}
type Pagination struct {
	Page    int `p:"page" v:"integer|min:1#数量是大于 0 整数" d:"1"`
	PerPage int `p:"per_page" v:"integer|min:1|max:200" d:"20"`
}
type TimeRange struct {
	Start string `p:"start"`
	End   string `p:"end"`
}
type TimeSearch struct {
	CreatedAt TimeRange `p:"created_at" `
	UpdatedAt TimeRange `p:"updated_at" `
	DeletedAt TimeRange `p:"deleted_at" `
}
type Time struct {
	CreatedAt *gtime.Time `p:"created_at" json:"created_at"`
	UpdatedAt *gtime.Time `p:"updated_at" json:"updated_at"`
	DeletedAt *gtime.Time `p:"deleted_at" json:"deleted_at"`
}
